Dynomotion

Group: DynoMotion Message: 8578 From: tapiolarikka Date: 11/5/2013
Subject: Amount of userDRO?
Hi Tom!

I read that Mach UserDro's 1 - 50 are mapped to KFlop. Is it possible to get more?
I'd need to pass app. 200 variables from mach to user program.

Simplest way would be having all these variables mapped to Kflop userdata.

Rgds,
Tapio

 
Group: DynoMotion Message: 8580 From: Tom Kerekes Date: 11/5/2013
Subject: Re: Amount of userDRO?
Hi Tapio,

There currently aren't that many KFLOP User Variables (it takes 2 KFLOP 32-bit variables to store one 64-bit mach3 DRO).

One solution might be to pass the variables down one-by-one to a KFLOP User Program and have the KFLOP User Program save them in Global Memory (the gather_buffer has space for 1 million doubles).

For example you might use 2 variables.  Mach3 would put a value for some variable into one.  Then store the Variable number in the 2nd.  Then execute a NotifyPlugins to execute a bit of code in KFLOP to pick up the value and based on the variable number store it somewhere.

Regards
TK




Group: DynoMotion Message: 8583 From: Tapio Larikka Date: 11/6/2013
Subject: Re: Amount of userDRO?

Hi Tom,
 
How are these doubles declared in user program?
 
Rgds,
Tapio
 
----- Original Message -----
Sent: Wednesday, November 06, 2013 12:09 AM
Subject: Re: [DynoMotion] Amount of userDRO?

 

Hi Tapio,

There currently aren't that many KFLOP User Variables (it takes 2 KFLOP 32-bit variables to store one 64-bit mach3 DRO).

One solution might be to pass the variables down one-by-one to a KFLOP User Program and have the KFLOP User Program save them in Global Memory (the gather_buffer has space for 1 million doubles).

For example you might use 2 variables.  Mach3 would put a value for some variable into one.  Then store the Variable number in the 2nd.  Then execute a NotifyPlugins to execute a bit of code in KFLOP to pick up the value and based on the variable number store it somewhere.

Regards
TK




Group: DynoMotion Message: 8585 From: Tom Kerekes Date: 11/6/2013
Subject: Re: Amount of userDRO?
Hi Tapio,

The gather buffer is defined in KMotionDef.h as:

#define MAX_GATHER_DATA 1000000 // Size of gather buffer (number of doubles, 8 bytes each).                   
extern double *gather_buffer;   // Large buffer for data gathering, Bode plots, or User use

and is allocated when KFLOP Boots.  So from a User Program you might do something like:

gather_buffer[200]=123.4;


Note that KMotion uses the gather buffer for Bode Plots and Step Response Plots.  But other than that it will be available for your use.

Regards
TK